<!--
 * @Author: huangrongji
 * @Date: 2021-11-26 23:10:36
 * @LastEditors: huangrongji
 * @LastEditTime: 2021-11-27 12:08:36
 * @Description: file content
-->
<template>
  <view class="content">
    <image class="logo" src="/static/logo.png"></image>
    <view>
      <text class="title">{{ title }}</text>
    </view>
    <view>
      <u--textarea
        v-model="value"
        placeholder="引入uview组件库"
        count
        height="200"
      ></u--textarea>
    </view>
    <view style="padding: 20rpx; width: 90%">
      <u-button type="primary" text="测试接口" @click="changeValue"></u-button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      title: "Hello",
      value: "",
    };
  },
  mounted() {},
  methods: {
    changeValue() {
      this.$http.api.getRepairClass(1).then((res) => {
        console.log(res[0]);
        // uni.$u.toast(res[0].name)
        this.value = JSON.stringify(res);
      });
    },
  },
};
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin: 200rpx auto 50rpx auto;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
